<!-- 购买列表 -->
<template>
    <div class="page-box h100 display-flex czbj">
        <p class="title-label">购买列表</p>
        <div class="mt10">
            <dxtable :dataJson="dataJson" :portUrl="portUrl" :isshowXz="false" :qx="qx" ref="databale" :formJson="formJson">
            </dxtable>
        </div>
    </div>
</template>
<script lang='ts' setup>
import dxtable from "./../../components/util/dxtable.vue";
import { dxget, dxpost, qurl, hf } from "./../../util/index";
import sort from "../../components/util/sort.vue";
import { h, ref, reactive } from "vue";

import pupimg from "./pupimg.vue"
const props = defineProps({
    pup: { type: String },
});
const initeer = () => {
    databale.value.initDataExpose();
};
let headBtn = [];
const databale = ref();
const klkjse = ref()
// 弹窗公用该列表
let dataJson = reactive([
    {
        title: "手机号码",
        key: "phone",
    },
    {
        title: "昵称",
        key: "nickname",
        search: true, // 是否在搜索栏展示
    },
    {
        title: '游戏名称',
        render(row) {
            const res = JSON.parse(row.text)
            return res.name
        }
    },
    {
        title: '描述',
        key: 'describe',
        width: 300,
        ellipsis: {
            tooltip: true
        },
        render(row) {
            const res = JSON.parse(row.text)
            return res.describe
        }
    },
    {
        title: '系统',
        render(row) {
            const res = JSON.parse(row.text)
            return res.system
        }
    },
    {
        title: '账号类型',
        render(row) {
            const res = JSON.parse(row.text)
            return res.accountNumber
        }
    },  {
        title: '服务器',
        render(row) {
            const res = JSON.parse(row.text)
            return res.server
        }
    },{
        title: '价格',
        render(row) {
            const res = JSON.parse(row.text)
            return res.price
        }
    },

    {
        title: "创建时间",
        key: "addTime",
        width: "150",
        type: "daterange",
    },
]);
const Userid = localStorage.id
let portUrl = "shm/shmgmlist";
const qx = {
    DeletePermissionID: "shmuserListdel", //删除
    EditPermissionIdentifier: "shmuserListbj22", // 编辑
    NewPermissionIdentifier: "shmuserListxz", // 新建
    ViewPermissionID: "shmuserListck", // 查看
};
let formJson = reactive([
    {
        title: "审核状态",
        key: "audit",
        type: "select",
        options: [
            {
                label: "等待审核",
                value: 1
            }, {
                label: "通过",
                value: 2
            }, {
                label: "不通过",
                value: 3
            }
        ],
        val: "1",
        required: true, // 是否为必填
    },
    {
        title: "审核备注",
        key: "AuditRemarks",
        type: "textarea",
    },
]);
let pupVal = props.pup;

</script>


